package com.sitech.portal.system.dao;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import com.sitech.ibnms.core.IPage;
import com.sitech.ibnms.core.PageForm;
import com.sitech.portal.system.domain.TblSYS_LOGINMSG;

public interface ISysLogInmsgDao {

	public void add(TblSYS_LOGINMSG tblSYS_LOGINMSG);

	public void update(TblSYS_LOGINMSG tblSYS_LOGINMSG);

	public void updateMenuType(TblSYS_LOGINMSG tblSYS_LOGINMSG);
	
	public void modifyTbSysLoginMsg(TblSYS_LOGINMSG tblSYS_LOGINMSG);

	public void delete(String id[]);

	public TblSYS_LOGINMSG findUserRoleByPk(String userId);

	public List findListByMap(Map obj);

	public IPage findListByDeparyType(String depart_type, String mid, PageForm pageForm);

	/**
	 * 根据用户的管理单元来查询该用户有权限看到的用户列表
	 * 
	 * @param depart_type
	 * @param mid
	 * @return
	 */
	public IPage findListByDeparyTypeAndUnit(String login_id, String userName, String deptId, PageForm pageForm);

	IPage findListByDeparyTypeAndUnit(String login_id, String userName, String loginPhone, String deptId, PageForm pageForm);

	public TblSYS_LOGINMSG findByUserCode(String userCode);

	public List<HashMap> findUserByDepartId(String deptId);

	/**
	 * @param userCode
	 * @param userPassword
	 * @return
	 * @throws MySecurityException
	 */
	public HashMap validLoginBySSO(String userCode, String userPassword,
			int tableCount) throws Exception;

	/**
	 * @param userCode
	 *            用户名
	 * @param userPassword
	 *            密码
	 * @param tableCount
	 *            表数量(用户特权表和管理单元表)
	 * @return
	 * @throws MySecurityException
	 */
	public HashMap validLogin(String userCode, String userPassword,
			int tableCount) throws Exception;

	public int getCount(String condition);

	public int getCountModule(java.util.HashMap a);

	public List getNaviParam(List getNaviParam);
	/**
	 * update password
	 */
	public void updatePassword(java.util.HashMap a);
	/**
	 * frozen user
	 */
	public void frozenUser(String id[]);

	/**
	 * cancel frozen user
	 */
	public void cancelfrozen(String id[]);

	/**
	 * show all users don't been frozen
	 */
	public IPage findUnfrozenList(HashMap map,PageForm pageForm);

	/**
	 * show all users have been frozen
	 */
	public IPage findFrozenList(HashMap map,PageForm pageForm);

	public List findUserAll();

	public HashMap findUserinfo(String userCode);

	public HashMap findUserinfoNoManageUnit(String userCode);

	public IPage findUserCodeLike(String usercode, String name, PageForm pageForm);

	/*
	 * 获取工作组和人的树形结构
	 */
	public List loadLoginTreeList(String WORKGROUP_ID, String flag);

	public IPage selectUserByPage(PageForm pageForm);
}
